unit ODEIntegrator;

interface
uses Matrix, ODEModel;

type TODEIntegrator = class
  protected
  Model : TODEModel;
  tol : extended;
  h : extended;
  TimeStart : extended;
  TimeEnd : extended;
  PositionInDense : integer;
  Stop : boolean;
  DensePoints : array of extended;

  public
    constructor Create( model: TODEModel; tolerance : extended; step : extended;
                        timeStart : extended; timeEnd : extended;
                        var densePoints : array of extended);
    procedure Run; virtual; abstract;
  end;

implementation

  constructor TODEIntegrator.Create( model: TODEModel; tolerance : extended; step : extended;
                      timeStart : extended; timeEnd : extended;
                      var densePoints : array of extended);
  begin
    self.Model := model;
    self.tol :=  tolerance;
    self.h := step;
    self.TimeStart := timeStart;
    self.TimeEnd := timeEnd;
    self.DensePoints := Addr(densePoints);
  end;
end.
